<!DOCTYPE html>
<html lang="cn">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <link rel="stylesheet" href="style.css">
  <link href="https://cdn.bootcdn.net/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
  <script type="text/javascript" src="js/jquery.min.js"></script>
  <title>Menubar</title>
</head>

<body>
  <div class="content">

    <div class="menubar">
      <div class="logo">
        <span class="logoicon"></span>
        <span class="logotitle">DEmO</span>
      </div>
      <ul>
        <!-- li>a>span.icon+span.title{Home} -->
        <li><a href="">
            <span class="icon"><i class="fa fa-home" aria-hidden="true"></i></span>
            <span class="title">Home</span>
          </a></li>
        <li><a href="">
            <span class="icon"><i class="fa fa-comments" aria-hidden="true"></i></span>
            <span class="title">Messages</span>
          </a></li>
        <li><a href="">
            <span class="icon"><i class="fa fa-table" aria-hidden="true"></i></span>
            <span class="title">Article</span>
          </a></li>
        <!-- <li><a href=""><span class="icon"></span><span class="title">Tab4</span></a></li> -->
        <li><a href="https://gitee.com/riddder/NavigationBar">
            <span class="icon"><i class="fa fa-user-circle-o" aria-hidden="true"></i></span>
            <span class="title">About</span>
          </a></li>
      </ul>
      <div class="user">
        <div class="userimg">
          <img src="img/00.jpg" alt="">
        </div>
        <span class="username">ADMIN</span>
      </div>
      <div id="toggleBar" class="bar"></div>
    </div>
    <div class="list">
      <div class="item">
        <div class="desc"></div>
        <div class="title"></div>
      </div>
      <div class="item">
        <div class="desc"></div>
        <div class="title"></div>
      </div>
      <div class="item">
        <div class="desc"></div>
        <div class="title"></div>
      </div>
      <div class="item">
        <div class="desc"></div>
        <div class="title"></div>
      </div>

      <div class="item">
        <div class="desc"></div>
        <div class="title"></div>
      </div>
      <div class="item">
        <div class="desc"></div>
        <div class="title"></div>
      </div>
      <div class="item">
        <div class="desc"></div>
        <div class="title"></div>
      </div>
      <div class="item">
        <div class="desc"></div>
        <div class="title"></div>
      </div>

      <div class="item">
        <div class="desc"></div>
        <div class="title"></div>
      </div>
      <div class="item">
        <div class="desc"></div>
        <div class="title"></div>
      </div>
      <div class="item">
        <div class="desc"></div>
        <div class="title"></div>
      </div>
      <div class="item">
        <div class="desc"></div>
        <div class="title"></div>
      </div>
    </div>
  </div>
  <div class="footer">
    @Ridder <br>
    Email  -  rito.c@foxmail.com <br>
  </div>
  <script type="text/javascript">
    window.onload = function() {
      let toggleBar = document.getElementById('toggleBar');
      let Menubar = document.getElementsByClassName('menubar')
      let MenubarUl = document.querySelector('.menubar ul')
      let LeftSildeMenubar = document.querySelector('.menubar ul')
      toggleBar.onclick = function() {
        LeftSildeMenubar.classList.toggle('active');
      }
      MenubarUl.onclick = function() {
        LeftSildeMenubar.classList.remove('active')
      }

      function toggleclik() {
        let toggle = document.querySelector('.menubar ul')
        toggle.classList.toggle('active')
      }
    }
  </script>
</body>

</html>
